package com.project.erp.model.contract.trade;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.project.erp.model.IdEntity;

/**
 * 
 * COPYRIGHT (C) 2013 BY XXX公司

 *  功能模块名：外贸-客户合同

 *  功能描述：外贸客户合同表

 * @author LiJiaGuo    

 * @version 1.0  

 * @created 2013-12-14 下午10:45:25
 */
@Entity
//表名与类名不相同时重新定义表名.
@Table(name = "TBL_TRADECUS_CONTRACT_DTL")
//默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class TradeCusContractDtl extends IdEntity {

	private static final long serialVersionUID = -5631031668052579334L;

	private String item;// 项目(条目)
	private String itemSize;// 项目(条目)规格
	private Double totalCont;// 柜数
	private Double boxOfCont;// 每柜盒数
	private Double totalBoxs;// 总盒数
	private Double pcsOfBox;// 每盒箱数
	private Double totalPcs;// 总箱数
	private Double mtwoOfCont;// 每柜平方数
	private Double totalMtwo;// 总平方数
	private Double fobUnitPrice;// (平方米)单价
	private Double amount;// 每条记录总价
	
	private TradeCusContract tradeCusContract;
	
	@Column(columnDefinition="varchar(50)")
	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public String getItemSize() {
		return itemSize;
	}

	public void setItemSize(String itemSize) {
		this.itemSize = itemSize;
	}

	@Column(nullable=false)
	public Double getTotalCont() {
		return totalCont;
	}

	public void setTotalCont(Double totalCont) {
		this.totalCont = totalCont;
	}

	@Column(nullable=false)
	public Double getBoxOfCont() {
		return boxOfCont;
	}

	public void setBoxOfCont(Double boxOfCont) {
		this.boxOfCont = boxOfCont;
	}

	@Column(nullable=false)
	public Double getTotalBoxs() {
		return totalBoxs;
	}

	public void setTotalBoxs(Double totalBoxs) {
		this.totalBoxs = totalBoxs;
	}
	
	@Column(nullable=false)
	public Double getPcsOfBox() {
		return pcsOfBox;
	}

	public void setPcsOfBox(Double pcsOfBox) {
		this.pcsOfBox = pcsOfBox;
	}

	@Column(nullable=false)
	public Double getTotalPcs() {
		return totalPcs;
	}

	public void setTotalPcs(Double totalPcs) {
		this.totalPcs = totalPcs;
	}

	@Column(nullable=false)
	public Double getMtwoOfCont() {
		return mtwoOfCont;
	}

	public void setMtwoOfCont(Double mtwoOfCont) {
		this.mtwoOfCont = mtwoOfCont;
	}

	@Column(nullable=false)
	public Double getTotalMtwo() {
		return totalMtwo;
	}

	public void setTotalMtwo(Double totalMtwo) {
		this.totalMtwo = totalMtwo;
	}

	@Column(nullable=false)
	public Double getFobUnitPrice() {
		return fobUnitPrice;
	}

	public void setFobUnitPrice(Double fobUnitPrice) {
		this.fobUnitPrice = fobUnitPrice;
	}

	@Column(nullable=false)
	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	@ManyToOne
	@JoinColumn(name="tracecus_id",nullable=false)
	@org.hibernate.annotations.ForeignKey(name="fk_tracecus_dtl")
	@org.hibernate.annotations.Index(name="idx_fk_tracecus_dtl")
	public TradeCusContract getTradeCusContract() {
		return tradeCusContract;
	}

	public void setTradeCusContract(TradeCusContract tradeCusContract) {
		this.tradeCusContract = tradeCusContract;
	}
}
